package com.jy.api.dao;

import com.jy.api.domain.MemberIntegralTransaction;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.Date;

/**
 * Created by xiaohua on 2019/5/7.
 */
public interface MemberIntegralTransactionDao extends CrudRepository<MemberIntegralTransaction,Integer> {


    Page<MemberIntegralTransaction> findAllByStoreIdOrderByAddTimeDesc(String storeId, Pageable pageable);


    Page<MemberIntegralTransaction> findAllByMemberNameLikeAndStoreIdOrderByAddTimeDesc(String name,String storeId,Pageable pageable);

    Page<MemberIntegralTransaction> findAllByStoreIdAndMobileLikeOrderByAddTimeDesc(String storeId,String mobile,Pageable pageable);

    Page<MemberIntegralTransaction> findAllByStoreIdAndAddTimeBetweenOrderByAddTimeDesc(String storeId, Date begin,Date end,Pageable pageable);

    Page<MemberIntegralTransaction> findAllByStoreIdAndAddTimeBetweenAndMemberNameLikeOrderByAddTimeDesc(String storeId, Date begin,Date end,String memberName,Pageable pageable);

    Page<MemberIntegralTransaction> findAllByStoreIdAndAddTimeBetweenAndMobileLikeOrderByAddTimeDesc(String storeId, Date begin,Date end,String mobile,Pageable pageable);


}
